/* 基础样式 */
body {
    margin: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    background-color: #1e88e5;
    color: white;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.logo i {
    font-size: 24px;
    margin-right: 8px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-white {
    color: white !important;
}

/* 页脚样式 */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 40px 20px 20px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: bold;
}

.footer-logo i {
    font-size: 24px;
    margin-right: 8px;
    color: #3498db;
}

.footer-about {
    font-size: 14px;
    line-height: 1.6;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: #bdc3c7;
    font-size: 20px;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: #3498db;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: white;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #3498db;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    text-align: center;
    font-size: 12px;
    color: #7f8c8d;
}

/* 其他组件样式 */
.el-dropdown-link {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }

    .nav-links {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
}

body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.8rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    margin-right: 10px;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: white;
}

.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: white;
}

.auth-buttons .el-button {
    margin-left: 10px;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1555529669-e69e7aa0ba9a?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar .el-input {
    flex: 1;
}

.search-bar .el-button {
    margin-left: 10px;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* 商品区域 */
.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    scroll-margin-top: 70px; /* 为导航栏预留空间 */
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.product-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-desc {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

.price-old {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: var(--gray-color);
    margin-left: 8px;
}

/* 分类区域 */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* 页脚 */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    scroll-margin-top: 70px; /* 为导航栏预留空间 */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-logo i {
    margin-right: 10px;
}

.footer-about {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: var(--accent-color);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }
}

/* 促销卡片样式 */
.promo-card {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

/* 关于我们卡片核心样式（类比促销卡片） */
.about-card {
    height: 100%;
    width: 100%;
    /* 保留促销卡片的圆角、溢出控制，调整布局为块级左对齐 */
    border-radius: 12px;
    overflow: hidden;
    display: block; /* 取消居中flex，改为块级布局 */
    text-align: left; /* 强制文字居左 */
}
/* 清除默认居中样式 */
.about-title, .about-content, .about-content p, .about-content ul {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}
/* 列表样式优化 */
.about-content ul li {
    text-align: left;
    line-height: 1.6;
}

.promo-content {
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.promo-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.promo-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 调整轮播指示器位置 */
.el-carousel__indicators {
    bottom: 30px;
}

.el-carousel__indicator button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
}

.el-carousel__indicator.is-active button {
    background-color: var(--accent-color);
}

/* 调整轮播箭头大小 */
.el-carousel__arrow {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background-color: rgba(0, 0, 0, 0.3);
}

.el-carousel__arrow:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }